package org.yelongframework.spring.web.servlet.handler.exception;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.ModelAndView;
import org.yelongframework.lang.Nullable;

/**
 * 视图响应异常处理器
 * 
 * 在响应一个页面出现异常的回调的接口。如调用的页面不存在、404、数据不存在等异常
 * 
 * @since 1.0.0
 */
@FunctionalInterface
public interface WebPageResponseExceptionResolver {

	@Nullable
	ModelAndView resolveException(HttpServletRequest request, HttpServletResponse response,
			@Nullable HandlerMethod handlerMethod, Exception ex);

}
